package com.ChenYaRou.www.po;

import java.util.Objects;

/**
 * @ClassName Food
 * @Description TODO
 * @Author 86183
 * @Date 2022/4/29 20:02
 * @Version 1.0
 **/
public class Food {
    private Integer id;
    private String name;
    private Float price;
    private Integer shopId;
    private String picture;

    public Food() {
    }

    public Food(String name, Float price, Integer shopId) {
        this.name = name;
        this.price = price;
        this.shopId = shopId;
    }

    @Override
    public String toString() {
        return "Food{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", shopId=" + shopId +
                ", picture='" + picture + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Food food = (Food) o;
        return Objects.equals(id, food.id) && Objects.equals(name, food.name) && Objects.equals(price, food.price) && Objects.equals(shopId, food.shopId) && Objects.equals(picture, food.picture);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, price, shopId, picture);
    }

    public String out() {
        return "?name='" + name + '\'' +
                ", price=" + price ;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public Integer getShopId() {
        return shopId;
    }

    public void setShopId(Integer shopId) {
        this.shopId = shopId;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }
}
